import {
  createRouter,
  createWebHashHistory
} from "vue-router";
import NProgress from 'nprogress'

let routes = [{
  path: '/',
  name: "Index",
  component: () => import('@/views/home/index'),
  hidden: true,
  meta: {
    name: '主页'
  }
}]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

router.beforeEach((to, from, next) => {
  NProgress.start();
  next();
})

router.afterEach(() => {
  NProgress.done();
});
export default router